package com.tangding.common.utils;


import org.springframework.util.StringUtils;

import com.tangding.common.exception.GException;
import com.tangding.common.tools.ErrorConstants;

/**
 * 参数校验帮助类
 */
public class ParamUtil extends StringUtils {
    public static void checkNotNull(Object params) throws GException {
        if (StringUtils.isEmpty(params)) {
            throw new GException(ErrorConstants.ERR_PARAMS);
        }
    }

    public static boolean isNotNullOrEmpty(Object params) {
        return !StringUtils.isEmpty(params);
    }
}
